package com.wangsd.web.report.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name = "bill_record")
@ApiModel(value = "微信对账单", description = "微信对账单")
public class BillRecord implements Serializable {
    private String tradeTime;//交易时间
    private String appId;//公众号id
    private String mchId;//商户号
    private String subMchId;//子商户号
    private String deviceInfo;//设备

    @Id
    @TableId(type = IdType.INPUT)
    @GeneratedValue(strategy = GenerationType.AUTO)
    private String transactionId;//微信订单号
    private String outTradeNo;//商户订单号
    private String openId;//用户表示
    private String tradeType;//支付类型
    private String tradeState;//支付状态
    private String bankType;//付款银行
    private String feeType;//货币种类
    private String totalFee;//总金额
    private String couponFee;//优惠金额
    private String refundId;//微信退款单号
    private String outRefundNo;//商户退款单号
    private String settlementRefundFee;//退款金额
    private String couponRefundFee;//优惠退款金额
    private String refundChannel;//退款类型
    private String refundState;//退款状态
    private String body;//商品名称
    private String attach;//商户数据包
    private String poundage;//手续费
    private String poundageRate;//费率
    private String totalAmount;//订单金额
    private String appliedRefundAmount;//申请退款额
    private String feeRemark;//费率描述
    private String refundTime;//退款时间
    private String refundSuccessTime;//退款完成时间
    private Integer reportStatus;
    /**
     * 以下是通用字段
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;
}
